local Obj = require("core.Obj")
local CombatCalc = require("skill.CombatCalc")
local RoleDefine = require("role.RoleDefine")
skill_list = skill_list or {}

function create(atk)
	if not atk then
		assert()
	end
	local skill = {}
	skill.atk = atk
	CombatCalc.initAttr(skill)
	CombatCalc.calcAttr(skill)
	Obj.create(skill, Obj.TYPE_SKILL)
	skill_list[atk] = skill
	return skill
end

function getAttr(skill, key)
	if key == RoleDefine.ATK then 
		return skill.atk
	end
	return 1
end

local empty = {[0] = 0}
function getBuf()
	return empty
end

function getHp()
	return 1
end

function getObjSkill(atk)
	local t = skill_list[atk]
	if t then
		return t
	end
	t = create(atk)
	skill_list[atk] = t
	return t
end

function setHp()
end